<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .contain {
            width: 600px;
            height: 600px;
            border: 1px solid red;
            display: grid;
            grid-template-columns: repeat(3, 200px);
            grid-template-rows: repeat(3, 200px);
            margin: 100px auto;
            /* 起名 */
            grid-template-areas: "a b c"
                                 "e f g"
                                 "h i j"
                ;
            /* 相同命名，则表示同一区域 . 表示不使用该区域 */
            grid-template-areas: "a b b"
                                 "d e g"
                                 "h i j"
            ;
        }

        /* 通过数字线的方式，摆放位置 */
        /* .item:nth-child(1){
            background-color: yellow;
            grid-row-start: 2;
            grid-row-end: 3;

            grid-column-start: 2;
            grid-column-end: 3;
        } */

        /* 通过命名， 区域来摆放 */
        /* .item:nth-child(1){
            background-color: yellow;
            grid-row-start: e-start;
            grid-row-end: e-end;

            grid-column-start: e-start;
            grid-column-end: e-end;
        } */

        /* 简写1 */
        /* .item:nth-child(1){
            background-color: yellow;
            grid-row: e-start/e-end;
            grid-column: e-start/f-end;
        } */

        /* 简写2 */
        .item:nth-child(1){
            background-color: yellow;
            grid-row: e;
            grid-column: f;
        }

        /* 简写3 */
        .item:nth-child(1){
            background-color: yellow;
            grid-area: b ;    
        }

    </style>
</head>
<body>
    <div class="contain">
            <div class="item"></div>
    </div>
</body>
</html>